package cn.mothin.frame.help;

import java.util.UUID;

import cn.mothin.frame.help.basis.ObjectId;
import cn.mothin.frame.help.config.ConfigReader;

public class UniqueCode {
    private static int mode=-1;
	
    static{
    	mode=ConfigReader.getInstance().getGenerateUniqueCodeMode();
    }
	
	public static String make(){
		if(mode==0){
			return UUID.randomUUID().toString();
		}else{
			return ObjectId.get().toString();
		}
	}
}
